<!DOCTYPE html>
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
        <title>首页</title>
        <meta charset="utf-8">
<!--        <meta name="viewport" content="width=device-width, initial-scale=1">-->
        <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
        <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
        <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
        <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap-table/1.16.0/bootstrap-table-locale-all.js"></script>


</head>
<body>


<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">新建会议</button>
<table class="table table-bordered">
    <tr><th>会议标题</th>
    <th>会议地点</th>
    <th>会议时间</th>
    <th>参加人员</th>
    <th>操作</th></tr>

    <tr th:each="a11:${a1}">
        <td th:text="${a11.title}"></td>
        <td th:text="${a11.address}"></td>
        <td th:text="${a11.startTime}"></td>
        <td th:text="${a11.people}"></td>
        <td><a href="meeting/meeting/showAll" th:href="@{/test(id=${a11.id})}"><button type="button" class="btn btn-info">上传</button></a>
            <button type="button" class="btn btn-info"  onClick="openUpdate('${a11.title}')">修改</button>
            <a href="meeting/meeting/showAll" th:href="@{/delete(id=${a11.id})}"><button type="button" class="btn btn-danger">删除</button></a>
            <a th:href="${a11.dow}"><button type="button" class="btn btn-info">下载</button></a>
            </td>
    </tr>
</table>

<!-- 模态框 -->
<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">新建会议</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <!-- 模态框主体 -->
            <div class="modal-body">
                <form action="/meeting/meeting/create" method="post">
                    <div class="form-group">
                        <label >会议标题:</label>
                        <input type="text" class="form-control" name="title">
                    </div>
                    <div class="form-group">
                        <label >会议地点:</label>
                        <input type="text" class="form-control" name="address">
                    </div>
                    <div class="form-group">
                        <label >会议时间:</label>
                        <input type="text" class="form-control" name="startTime">
                    </div>
                    <div class="form-group">
                        <label >参加人员:</label>
                        <input type="checkbox" name="vehicle" value="张三">张三
                        <input type="checkbox" name="vehicle" value="李四">李四
                        <input type="checkbox" name="vehicle" value="王五">王五
                        <input type="checkbox" name="vehicle" value="王六">王六
                        <input type="checkbox" name="vehicle" value="张七">张七<br>
                    </div>

                    <button type="submit" class="btn btn-primary">提交</button>
                </form>
            </div>
            <!-- 模态框底部 -->
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>

        </div>
    </div>
</div>


<!-- 模态框 -->
<div class="modal fade" id="updateModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">修改会议</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <!-- 模态框主体 -->
            <div class="modal-body">
                <form action="/meeting/meeting/create" method="post">
                    <div class="form-group">
                        <label >会议标题:</label>
                        <input type="text" class="form-control" name="updatetid" value=id>
                    </div>
                    <div class="form-group">
                        <label >会议地点:</label>
                        <input type="text" class="form-control" name="address">
                    </div>
                    <div class="form-group">
                        <label >会议时间:</label>
                        <input type="text" class="form-control" name="startTime">
                    </div>
                    <div class="form-group">
                        <label >参加人员:</label>
                        <input type="checkbox" name="vehicle" value="张三">张三
                        <input type="checkbox" name="vehicle" value="李四">李四
                        <input type="checkbox" name="vehicle" value="王五">王五
                        <input type="checkbox" name="vehicle" value="王六">王六
                        <input type="checkbox" name="vehicle" value="张七">张七<br>
                    </div>

                    <button type="submit" class="btn btn-primary">提交</button>
                </form>
            </div>
            <!-- 模态框底部 -->
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>

        </div>
    </div>
</div>



<script>

function openUpdate(id){
    $("input[name='updatetid']").val(id);
	$('#updateModal').modal('show')
}
</script>

</body>
</html>